tools/insn-fuzz: Correct hook prototypes, and assert() appropriate segments
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 Mar 2017 16:49:36 +0000 (16:49 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Apr 2017 17:42:49 +0000 (18:42 +0100)
commit125372a6e51eb6fd5d8a2185bf66e48647c7d770
treeab70f5b9283d092a942084eb980674829df96b76
parent8ba7b845c2a68f9d025710a57c87870b3ad19ac8
tools/insn-fuzz: Correct hook prototypes, and assert() appropriate segments

The correct prototypes for the hooks are to use enum x86_segment rather than
unsigned int.  It is implementation specific as to whether this compiles.

assert() that the emulator never passes an inappropriate segment.  The only
hook which may legitimately be passed x86_seg_none is invlpg().

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/fuzz/x86_instruction_emulator/fuzz-emul.c
tools/tests/x86_emulator/test_x86_emulator.c